#include "precompiled.h"
 
ENUM
{
    EXPEDITION_BASE_CAMP_TELEPORT = 64014,
    FORMATION_GROUNDS_TELEPORT = 64032,
    COLOSSAL_FORGE_TELEPORT = 64028,
    SCRAPYARD_TELEPORT = 64031,
    ANTECHAMBER_OF_ULDUAR_TELEPORT = 64030,
    SHATTERED_WALKWAY_TELEPORT = 64029,
    CONSERVATORY_OF_LIFE_TELEPORT = 64024,
    SPARK_OF_IMAGINATION_TELEPORT = 65061, //??? Propably
    PRISON_OF_YOGG_SARON_TELEPORT = 65042 // Decent INTO madness
};
 
#define G_EXPEDITION_BASE_CAMP  "Expedition Base Camp"
#define G_FORMATION_GROUNDS  "Formation Grounds"
#define G_COLOSSAL_FORGE  "Collosal Forge"
#define G_SCRAPYARD "Scrapyard"
#define G_ANTECHAMBER_OF_ULDUAR  "Antechamber of Ulduar"
#define G_SHATTERED_WALKWAY  "Shattered Walkway"
#define G_CONSERVATORY_OF_LIFE  "Conservatory of Life"
#define G_SPARK_OF_IMAGINATION  "Spark of Imagination"
#define G_PRISON_OF_YOGG_SARON  "Prison of Yogg-Saron"
 
bool GossipHello_ulduar_teleporter(Player* pPlayer, Creature* pCreature)
{
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_EXPEDITION_BASE_CAMP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_FORMATION_GROUNDS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_COLOSSAL_FORGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_SCRAPYARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_ANTECHAMBER_OF_ULDUAR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_SHATTERED_WALKWAY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_CONSERVATORY_OF_LIFE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_SPARK_OF_IMAGINATION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
    pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, G_PRISON_OF_YOGG_SARON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
 
    pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
 
    return TRUE;
}
 
bool GossipSelect_ulduar_teleporter(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
    switch(uiAction)
    {
    CASE GOSSIP_ACTION_INFO_DEF+1:
        pCreature->CastSpell(pPlayer, EXPEDITION_BASE_CAMP_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+2:
        pCreature->CastSpell(pPlayer, FORMATION_GROUNDS_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+3:
        pCreature->CastSpell(pPlayer, COLOSSAL_FORGE_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+4:
        pCreature->CastSpell(pPlayer, ANTECHAMBER_OF_ULDUAR_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+5:
        pCreature->CastSpell(pPlayer, SHATTERED_WALKWAY_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+6:
        pCreature->CastSpell(pPlayer, CONSERVATORY_OF_LIFE_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+7:
        pCreature->CastSpell(pPlayer, SPARK_OF_IMAGINATION_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+8:
        pCreature->CastSpell(pPlayer, PRISON_OF_YOGG_SARON_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    CASE GOSSIP_ACTION_INFO_DEF+9:
        pCreature->CastSpell(pPlayer, SCRAPYARD_TELEPORT, TRUE);
        pPlayer->CLOSE_GOSSIP_MENU();
        break;
    }
    return TRUE;
}
 
void AddSC_ulduar_teleporter()
{
    Script* newscript;
 
    newscript = new Script;
    newscript->Name = "ulduar_teleporter";
    newscript->pGossipHello = &GossipHello_ulduar_teleporter;
    newscript->pGossipSelect = &GossipSelect_ulduar_teleporter;
    newscript->RegisterSelf();
}